package com.tcfvic.client.pojos;
// Generated 29/03/2010 9:10:02 PM by Hibernate Tools 3.1.0.beta4

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * Employmentdetails generated by hbm2java
 */
@Entity
@Table(name="employmentdetails"
    
, uniqueConstraints = {  }
)

public class Employmentdetails  implements java.io.Serializable {


    // Fields    

     private EmploymentdetailsId id;
     private Person person;
     private Workercompany workercompany;
     private String employeenumber;
     private String state;
     private String division;
     private String position;
     private String status;
     private String sector;
     private Date datestarted;
     private Date dateleaving;


    // Constructors

    /** default constructor */
    public Employmentdetails() {
    }

	/** minimal constructor */
    public Employmentdetails(EmploymentdetailsId id, Person person, Workercompany workercompany) {
        this.id = id;
        this.person = person;
        this.workercompany = workercompany;
    }
    
    /** full constructor */
    public Employmentdetails(EmploymentdetailsId id, Person person, Workercompany workercompany, String employeenumber, String state, String division, String position, String status, String sector, Date datestarted, Date dateleaving) {
        this.id = id;
        this.person = person;
        this.workercompany = workercompany;
        this.employeenumber = employeenumber;
        this.state = state;
        this.division = division;
        this.position = position;
        this.status = status;
        this.sector = sector;
        this.datestarted = datestarted;
        this.dateleaving = dateleaving;
    }
    

   
    // Property accessors
    @EmbeddedId
    @AttributeOverrides( {
        @AttributeOverride(name="workerCompanyId", column=@Column(name="WorkerCompany_id", unique=false, nullable=false, insertable=true, updatable=true) ), 
        @AttributeOverride(name="personId", column=@Column(name="Person_id", unique=false, nullable=false, insertable=true, updatable=true) ) } )

    public EmploymentdetailsId getId() {
        return this.id;
    }
    
    public void setId(EmploymentdetailsId id) {
        this.id = id;
    }
    @ManyToOne(cascade={},
        fetch=FetchType.LAZY)
    
        @JoinColumn(name="Person_id", unique=false, nullable=false, insertable=false, updatable=false)

    public Person getPerson() {
        return this.person;
    }
    
    public void setPerson(Person person) {
        this.person = person;
    }
    @ManyToOne(cascade={},
        fetch=FetchType.LAZY)
    
        @JoinColumn(name="WorkerCompany_id", unique=false, nullable=false, insertable=false, updatable=false)

    public Workercompany getWorkercompany() {
        return this.workercompany;
    }
    
    public void setWorkercompany(Workercompany workercompany) {
        this.workercompany = workercompany;
    }
    @Column(name="employeenumber", unique=false, nullable=true, insertable=true, updatable=true, length=45)

    public String getEmployeenumber() {
        return this.employeenumber;
    }
    
    public void setEmployeenumber(String employeenumber) {
        this.employeenumber = employeenumber;
    }
    @Column(name="state", unique=false, nullable=true, insertable=true, updatable=true, length=45)

    public String getState() {
        return this.state;
    }
    
    public void setState(String state) {
        this.state = state;
    }
    @Column(name="division", unique=false, nullable=true, insertable=true, updatable=true, length=45)

    public String getDivision() {
        return this.division;
    }
    
    public void setDivision(String division) {
        this.division = division;
    }
    @Column(name="position", unique=false, nullable=true, insertable=true, updatable=true, length=45)

    public String getPosition() {
        return this.position;
    }
    
    public void setPosition(String position) {
        this.position = position;
    }
    @Column(name="status", unique=false, nullable=true, insertable=true, updatable=true, length=45)

    public String getStatus() {
        return this.status;
    }
    
    public void setStatus(String status) {
        this.status = status;
    }
    @Column(name="sector", unique=false, nullable=true, insertable=true, updatable=true, length=45)

    public String getSector() {
        return this.sector;
    }
    
    public void setSector(String sector) {
        this.sector = sector;
    }
    @Column(name="datestarted", unique=false, nullable=true, insertable=true, updatable=true, length=10)

    public Date getDatestarted() {
        return this.datestarted;
    }
    
    public void setDatestarted(Date datestarted) {
        this.datestarted = datestarted;
    }
    @Column(name="dateleaving", unique=false, nullable=true, insertable=true, updatable=true, length=10)

    public Date getDateleaving() {
        return this.dateleaving;
    }
    
    public void setDateleaving(Date dateleaving) {
        this.dateleaving = dateleaving;
    }
   








}
